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

Part not tping to others?

Asked by 5 years ago

Hey so I am trying to make a part go to others and its in an event so it goes from the server but when I type a name in it will not go to that player it only goes to me! plr goes to the text box where you say the play and jail is just the model in the workspace!

open = false

game.ReplicatedStorage.jail.OnServerEvent:Connect(function(plr,jail)

    if open == false then

    game.Workspace.j:Clone().Parent = game.Workspace
    game.Workspace.j.CFrame = CFrame.new(plr.character.HumanoidRootPart.Position)   
    open = true
else
    game.Workspace.j:Destroy()
    open = false

    end

end)
0
See who player is in the parameters and make Character capitalized. royaltoe 5144 — 5y
0
How would we see what player is in the parameters? Darthman522 10 — 5y

1 answer

Log in to vote
0
Answered by
karlo_tr10 1233 Moderation Voter
5 years ago

First parameter of RemoteEvent is player if you have something like this

Event:FireServer(player,jail) -- Player is player that is in textbox

-- Then parameters should be like this
Event.OnServerEvent:Connect(function(player,target,jaul) -- In this case target is player that is textbox
Ad

Answer this question