Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Why doesnt my scripts work anymore and these last words r to make it more "specific"?

Asked by 3 months ago

local script:

local player = game.Players.LocalPlayer

local remoteEvent = game.ReplicatedStorage:WaitForChild("playertp")



player.Chatted:Connect(function(msg)

if msg:lower():match("goto") then

local targetPlayer = game.Players:FindFirstChild(msg:sub(6))

if targetPlayer and targetPlayer.Character then

player.Character.HumanoidRootPart.CFrame = CFrame.new(targetPlayer.Character.Head.Position)

end

elseif msg:lower():match("get") then

local targetPlayer = game.Players:FindFirstChild(msg:sub(5))



if targetPlayer and targetPlayer.Character then

remoteEvent:FireServer(targetPlayer.Character)



end

end

end)

server script:

local remoteEvent = game.ReplicatedStorage:WaitForChild("playertp")



remoteEvent.OnServerEvent:Connect(function(player, target)



target.HumanoidRootPart.CFrame = CFrame.new(player.Character.Head.Position)



end)

it is mean to teleport me to whoever i say when i say goto followed by the player name and teleport the player to me when i say get followed by the player name but its not anymore

0
Is there an error Creacoz 107 — 3mo
0
nope Gameplayer365247v2 551 — 3mo
0
thats why its so hard to solve Gameplayer365247v2 551 — 3mo
0
From the looks of it, you could be saying their username incorrectly? Your admin is very case sensitive, one lowercase letter or missing letter could led to it not passing the if statements. PhantomVisual 664 — 3mo

Answer this question