function die() game.StarterGui.Timer.Reset.Visible = true game.StarterGui.Timer.Start.Visible = true game.StarterGui.Timer.Stop.Visible = true game.StarterGui.Timer.Frame.Time.Visible = true end script.Parent.MouseButton1Down:connect(die)
and
function die() game.StarterGui.Timer.Reset.Visible = false game.StarterGui.Timer.Start.Visible = false game.StarterGui.Timer.Stop.Visible = false game.StarterGui.Timer.Frame.Time.Visible = false end script.Parent.MouseButton1Down:connect(die)
wherien when a certain button is clicked, it makes the assets visible/invisible.
--[[Note: my tree: game StarterGui Settings Frame Timer Off Script On Script Open Timer Frame Time(A text label Reset (txt button) Stop (txt button) Start (txt button) ]]
You would change what's in the PlayerGui, not the StarterGui
Also, make sure that all scripts inside the StarterGui/PlayerGui are Local Scripts
local gui = game.Players.LocalPlayer:WaitForChild("PlayerGui") local timer = gui:WaitForChild("Timer") script.Parent.MouseButton1Click:Connect(function() timer.Reset.Visible = true timer.Start.Visible = true timer.Stop.Visible = true timer.Frame.Time.Visible = true end)
First of all, you should read this: http://wiki.roblox.com/index.php?title=PlayerGui_vs._StarterGui
I will, however, summarize it here.
Whenever your character respawns, the contents inside of StarterGui get copied to a special directory called PlayerGui, which is located inside your own Player object.
You can check it out by pressing F5 and trying to change the contents in StarterGui on the explorer while testing, and then changing the contents of PlayerGui inside your Player in the Players service.
You can access your player object by writing game.Players.LocalPlayer
in a LocalScript, and your PlayerGui by either travelling the hierarchy using script.Parent.Parent.Parent (...)
or by doing LocalPlayer.PlayerGui
.
To fix it, you first need to make sure that both scripts are LocalScripts (their icon should be like the script's, but with a little person on them). After you do that, you can do:
timer = game.Players.LocalPlayer.PlayerGui:FindFirstChild("Timer") function die() timer.Reset.Visible = false timer.Start.Visible = false timer.Stop.Visible = false timer.Frame.Time.Visible = false end script.Parent.MouseButton1Down:connect(die)
Hope this helps.