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)

5 comments

0

why

0

@incapaz do you see whats wrong with the scripts and why its not working?

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")

0

Still >:C

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.