hello so i am making a duel combat system and the teleportation was not working here is my script
local l = script.Parent.Value1.Value -- if the player touch the part a bool value will be its name(as a string) and if the touch ended it will be nil (as a string) etc
local s = script.Parent.Value2.Value --same function applied here (dont mind about the variable names)
if script.Parent.plr1 == true and script.Parent.plr2 == true then --- when the player touch the part it actually set a bool value to true so if both player are touching the part both bool value will be set true then it will teleport them
wait(0.1)
game.Workspace:FindFirstChild(tostring(l)).HumanoidRootPart.CFrame = CFrame.new(49.05, 1.5, -110.59) -- this is not working
game.Workspace:FindFirstChild(tostring(s)).HumanoidRootPart.CFrame = CFrame.new(8.42, 1.5, -103.83) --this too
end
btw i didnt recieve any errors
i used tostring because it could get errors
if u didnt understand something lemme know
any help are apreciated
i found out the error its at the if statment i should have put the .Value at plr1 and pl2 however the if statement is not working i am confuese right now
if there is no primarypart set, it wonât work because the primarypart is nil.
If the model doesnât exist, obviously it wonât work.
If you use . instead of : it also wonât work.
I donât know the real issue here because i canât see the script, but i think itâs the last one.
well it runs when both player are step in a brick then it will teleport them to duel its a duel system like both player should stand on a brick then they get teleported