Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isnt it changing the text?!

Asked by 6 years ago
Edited 6 years ago

I've been trying this FOR AN HOUR and I still cant find a solution to it >:C

localscript:

local Remote = game.ReplicatedStorage.Remotes['ShowRank']
local p = game.Players.LocalPlayer
local function ShowRank()
script.Parent.Text = p.leaderstats.Rank.Value   
print("Rank shown") 
end 
Remote.OnClientEvent:Connect(ShowRank)

AND IT DOESNT EVENT PRINT RANK SHOWN!

script:

local ShowR = Instance.new("RemoteEvent")
ShowR.Parent = game.ReplicatedStorage.Remotes
ShowR.Name = "ShowRank"

local function SHOWr(p)
ShowRep:FireClient(p)
end
game.Workspace.HitBoxes[Player.Name.."'s Hitbox"].OnPlayerClick.MouseClick:Connect(SHOWr)
0
why User#19524 175 — 6y
0
@incapaz do you see whats wrong with the scripts and why its not working? mixgingengerina10 223 — 6y
0
try waitforchild. It's because the script created it later so it wasn't listened for in time. So for the local script do: game.ReplicatedStorage.Remotes:WaitForChild("ShowRank") User#19524 175 — 6y
0
Still >:C mixgingengerina10 223 — 6y
0
Do some debugging: Add calls to the print function in the server. Print some text. LocalScript location: Is it in Backpack, PlayerScripts, PlayerGui, Player Character, or ReplicatedFirst? If not, place it there. Is the script Disabled? If so, enable it. User#19524 175 — 6y

Answer this question