So. i am making if you touch a brick then a gui openes but it only works in studio but not online with other players why? and it is a normal script. not a localscript
Workspace.
http://imgur.com/a/rTjmb
Here's the current script.
local debounce = false
local isActive = script.Parent.Parent.Job.JobActive
function Shop(hit)
if not debounce then
if hit.Parent:FindFirstChild("Humanoid") then
local clone = game.ServerStorage.JobGuis:FindFirstChild("CableMan"):Clone()
clone.Parent = game.Players:FindFirstChild(hit.Parent.Name).PlayerGui
debounce = true
if isActive.Value == true then
if script.Parent.Parent.CableMan then
script.Parent.Parent.CableMan:Destroy()
end
game.ServerStorage.ErrorGuis.AlreadyJob:Clone().Parent = game.Players.LocalPlayer.PlayerGui
wait(2)
game.Players.LocalPlayer.PlayerGui.AlreadyJob:Destroy()
end
wait(10)
debounce = false
end
end
end
game.Workspace.Jobs.CableMan.Touched:connect(Shop)

3 comments
??
You're using a LocalPlayer in a ServerScript. He's asking what type of script this is because you can not access ServerStorage in a LocalScript, and you can not get LocalPlayer in a ServerScript. Also, you changed your title from one bad one to another. Maybe try "Touch Brick Gui Insert Error in DevConsole Here"
Well, how am im gonna do this then?