Can you have the normal function of a script but also have the thing of local player which is for local scripts. For ex. It will have locals, functions, if's, changing visibility's on surface Gui's and the text, and script.Parent things in the script but it would also have the local player thing.
So the main point is can you use functions from a normal script and a local script as I guess you could say one or One Script.
So what the script would do is,(i'm shortening the script)
function onClicked(c)
local UserName = script.Parent.Parent.Username.Text
local ItemName = script.Parent.Parent.Item.Text
local FindUserName = game.Players:FindFirstChildOfClass(UserName)
(this is the part i'm unsure about aka the one with the localplayer)
local FindItemName = game.Players.LocalPlayer.Backpack:FindFirstChildOfClass(ItemName)
if FindUserName and FindItemName == true then
(Etcetera)
else
(Etcetera)
script.Parent.MouseButton1Click:connect(onClicked) |