so i think i'm on the right track but this is confusing me
x = game.Workspace.Baseplate player = script.Parent.Parent.TextBox.Value.Value function clear() if player == player then --some code here end script.Parent.MouseButton1Click:Connect(clear)
what i want is to make this select a player by typing it into the box and then i can kill that player, i don't need a kill script i just need to know how to make this work. sorry if this didn't make sense. thanks for reading.
x = game.Workspace.Baseplate player = script.Parent.Parent.TextBox.Value -- you put value.value function clear() if player == player then --some code here end script.Parent.MouseButton1Click:Connect(clear)
script.Parent.MouseButton1Click:Connect(function() -- connect to event player = game.Players:FindFirstChild(script.Parent.Parent.TextBox.Text) -- try to find the player with the name specified in the textbox if player then -- check if player exists player.Character:BreakJoints() -- kill player end end)
Oh yeah by the way this won't work cos of a few reasons.
If this is a localscript, you cannot kill other players. if this is a serverscript, you cannot see the text changed by the client, or connect to the event.