I have two scripts named "ColorChange" and "Script", "Script" is only executed when "ColorChange" is executed, this is what contains inside "ColorChange":
local pad = script.Parent function onTouch(hit) local user = game.Players:GetPlayerFromCharacter(hit.Parent) if user ~= nil then pad.BrickColor = user.TeamColor end end script.Parent.Touched:connect(onTouch)
This is what then contains inside "Script":
local function trigger() game.StarterGui.ScreenGui.TextButton.LocalScript.Disabled = false end game.Workspace.A.Changed:Connect(trigger)
"Script" is supposed to enable the LocalScript inside the TextButton once "ColorChange" changes the BrickColor of the part, the TextButton is a teleportation Button of which when a player presses the TextButton, they are teleported to the designated part (The part's name is A)
But there's one issue I am facing, even when the LocalScript is successfully enabled, the player won't teleport to the designated part when the button is pressed, how do I fix this?
Here's a video about the issue I am currently facing: https://gyazo.com/ecb4f1154705a87ba7f8754c1892eb92
StarterGui is what you start with. you would have to look for it inside player.playerGui
that doesn't matter in the first place as you cannot enable a local script with a server script. Try using a RemoteEvent