Handcuff script returning "(a userdata value)" Any Help?
LocalScript in Handcuff tool.
1 | local Officer = game.Players.LocalPlayer |
3 | script.Parent.Handle.Touched:Connect( function (hit) |
4 | if hit.Parent:FindFirstChild( "Humanoid" ) then |
5 | local arrestedworkspaceplr = workspace [ hit.Parent.Name ] |
6 | local arrestedplayer = game.Players:GetPlayerFromCharacter(arrestedworkspaceplr) |
7 | game.ReplicatedStorage.Police.CloneHandcuffGui:FireServer( tostring (arrestedplayer)) |
ServerScript in ServerScriptStorage
2 | local PoliceFolder = game.ReplicatedStorage.Police |
4 | PoliceFolder.CloneHandcuffGui.OnServerEvent:Connect( function (arrestedplayer) |
6 | local PersonGettingArresting = arrestedplayer |
7 | local ClonedGui = game.ServerStorage.Police.GUIs.RequestToHandcuffGui |
8 | ClonedGui.CuffGui.AreYouSure.Text = "Are you sure you want to arrest" .. PersonGettingArresting.. "?" |
I keep getting this error
12:20:37.473 - ServerScriptService.PoliceEvents:8: attempt to concatenate local 'PersonGettingArresting' (a userdata value)
I just dont understand whats wrong with the code. I been trying to script this for hours.