I dont know why this script isnt working.I am new with programming and trying to make an Gui for an car,but bevor I try to add an Value the script it needs to Show up.
`script.Parent.Touched:connect(function(plr) game.ServerStorage.ScreenGui:Clone()t=plr.PlayerGui end) `
Use this method:
local TestGui = script.Parent[GUI'S NAME] script.Parent.Touched:Connect(function(t) local plr = game.Players:GetPlayerFromCharacter(t.Parent) -- Creates a new variable contains a player value if plr.Character and plr.PlayerGui:FindFirstChild('TestGui') then -- This will check if the player is alive and if he has the gui or not plr.PlayerGui:FindFirstChild('TestGui'):Destroy() TestGui:Clone().Parent = plr.PlayerGui print('Replaced',TestGui.Name) else TestGui:Clone().Parent = plr.PlayerGui print('Cloned',TestGui.Name) end end)
Make sure the script and the gui are inside the same parent.
If you this is too much for you, just look up at wiki.roblox.com as it has a very useful information for new people like you.