i have a transmutation (teleportation) script that works perfectly in one game, but when i put it in my other game, it refuses to teleport me or do anything. the remote event fires and is picked up on the server, i did print checks for it and it worked, however the player doesn’t teleport at all.
local script in starter character scripts:
wait(2)
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("Transmutation") or ReplicatedStorage:FindFirstChild("Transmutation")
local Mouse = Player:GetMouse()
local UserInputService = game:GetService("UserInputService")
repeat
wait()
until Character.Parent == workspace
local Debounce = false
UserInputService.InputBegan:Connect(function(Input, gameProcessed)
if not gameProcessed and not Character:FindFirstChild("disableTransmutation") then
if Input.KeyCode == Enum.KeyCode.Q and not Debounce and Mouse.Target and Character.Humanoid.Health > 0 and not Character.Humanoid.PlatformStand then
Debounce = true
Event:FireServer()
wait(2)
Debounce = false
end
end
end)
normal script in server script service:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Event = ReplicatedStorage:WaitForChild("Transmutation")
local Debris = game:GetService("Debris")
local Mouse = ReplicatedStorage:WaitForChild("Mouse")
local tweenClient = ReplicatedStorage:WaitForChild("tweenClient")
local Message = ReplicatedStorage:WaitForChild("Message")
local function getMaxDistance(Player)
local Rank = Player:WaitForChild("GroupRank").Value
if Rank == 1 then -- Neophyte
return 5
elseif Rank == 2 then -- Intermediate
return 8
elseif Rank == 3 then -- Adept
return 10
elseif Rank == 4 then -- Proficient
return 15
elseif Rank == 5 then -- Apprentice
return 20
elseif Rank == 6 then -- Intelligent
return 25
elseif Rank == 7 then -- Veteran
return 32
elseif Rank == 8 then -- Mastery
return 40
elseif Rank == 9 then -- Prefect
return 45
elseif Rank == 15 then -- Corps de Garde
return 75
elseif Rank == 20 then -- Intern
return 55
elseif Rank == 22 then -- Professor
return 55
elseif Rank == 24 then -- Senior Lecturer
return 60
elseif Rank == 26 then -- Academician
return 65
elseif Rank == 28 then -- Head Consutlant
return 70
elseif Rank == 30 then -- Witch Council
return 70
elseif Rank == 32 then -- Head Councillor
return 70
elseif Rank == 40 then -- Supremacy
return 250
elseif Rank == 44 then -- Witchcraft Directorates
return 75
elseif Rank == 50 then -- Superintendence
return 80
elseif Rank == 54 then -- Headministry
return 90
elseif Rank == 252 then -- Ethereal Architect
return 10000
elseif Rank == 253 then -- Ethereal Government
return 1000
elseif Rank == 254 then -- Ethereal Doorkeeper
return 1000
elseif Rank == 255 then -- Ethereal Overseer
return 1000
end
end
local function Teleport(Player, Position)
local soundEffect = script.Effect:Clone()
soundEffect.Parent = Player.Character.HumanoidRootPart
soundEffect.Stopped:Connect(function()
soundEffect:Destroy()
end)
soundEffect:Play()
wait(0.3)
for _,v in next, Player.Character:GetDescendants() do
if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" and v.Name ~= "Collide_Part" and not v.Parent:IsA("Tool") then
local Clone = v:Clone()
Clone.CanCollide = false
Clone.Name = "Transmutation"
Clone.BrickColor = BrickColor.new("Really black")
local Face = Clone:FindFirstChildOfClass("Decal")
if Face then
Face:Destroy()
end
local Face2 = v:FindFirstChildOfClass("Decal")
if Face2 then
Face2.Transparency = 1
end
Clone.Parent = workspace
tweenClient:FireAllClients({Clone, 0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, {Transparency = 1, Size = v.Size + Vector3.new(1, 1, 1)}})
tweenClient:FireAllClients({v, 0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, {Transparency = 1}})
Debris:AddItem(Clone, 0.3)
end
end
wait(0.3)
Player.Character:MoveTo(Position)
wait(0.8)
for _,v in next, Player.Character:GetDescendants() do
if v:IsA("BasePart")and v.Name ~= "HumanoidRootPart" and v.Name ~= "Collide_Part" and not v.Parent:IsA("Tool") then
local Clone = v:Clone()
Clone.CanCollide = false
Clone.Name = "Transmutation"
Clone.BrickColor = BrickColor.new("Really black")
local Face = Clone:FindFirstChildOfClass("Decal")
if Face then
Face:Destroy()
end
local Face2 = v:FindFirstChildOfClass("Decal")
if Face2 then
Face2.Transparency = 0
end
Clone.Parent = workspace
tweenClient:FireAllClients({Clone, 0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, {Transparency = 1, Size = v.Size + Vector3.new(1, 1, 1)}})
tweenClient:FireAllClients({v, 0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, {Transparency = 0}})
Debris:AddItem(Clone, 0.3)
end
end
end
Event.OnServerEvent:Connect(function(Player)
local success, errorMessage = pcall(function()
if Player and Player.Character and Player.Character:FindFirstChild("Head") then
local Position = Mouse:InvokeClient(Player, "Position")
local Distance, maxDistance = (Position - Player.Character.Head.Position).Magnitude, getMaxDistance(Player)
if Distance > maxDistance then
ReplicatedStorage.Message:FireClient(Player, "You are not powerful enough to transmutate that far.")
return
end
local MultiAppa = false
if Player:WaitForChild("GroupRank").Value >= 12 then
MultiAppa = true
end
if MultiAppa and not Player.Character:FindFirstChild("disableMulti") then
for i,v in next, Players:GetPlayers() do
if v.Character and v ~= Player then
if v.Character:FindFirstChild("Head") then
if (v.Character.Head.Position - Player.Character.Head.Position).Magnitude <= 5 then
spawn(function()
local newPos = Position + Vector3.new(math.random(-5, 5), 0, math.random(-5, 5))
Teleport(v, newPos)
end)
end
end
end
end
end
Teleport(Player, Position)
end
end)
if errorMessage then
warn(errorMessage)
end
end)
i have no idea why it’s not working.
everything is there exactly like it is in the other game, and nothing is missing but it’s not working. there are values for group rank and everything and it still doesn’t work.
nothing in output