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

[SOLVED BY ME] Attempt to concatenate Instance with string? (in a normal script, remoteevent script)

Asked by 4 years ago
Edited 4 years ago

Please encode Lua code in the Lua block code tag (look for the Lua icon in the editor).

Please help with this

Code:

game.ReplicatedStorage.AdminPanelEvents.RankPromotion.OnServerEvent:Connect(function(PlayerToGiveRankTo, Reason, Rank)
    print(PlayerToGiveRankTo.."'s has been promoted to "..Rank.."!")
    game.Players:FindFirstChild(PlayerToGiveRankTo).leaderstats.Rank.Value = Rank
end)

the error is on the line "game.Players:FindFirstChild(PlayerToGiveRankTo).leaderstats.Rank.Value = Rank"

0
don't try to concatenate the variable emervise 123 — 4y
0
what do you mean? Philipceo90 18 — 4y
0
Can you put your script in a code block? rabbi99 714 — 4y
0
in a block? Philipceo90 18 — 4y
View all comments (3 more)
0
whats the error Philipceo90 18 — 4y
0
someone can please help fix this Philipceo90 18 — 4y
0
Because your using the player isntance. Use PlayerToGiveRankTo.Name mybituploads 304 — 4y

Answer this question