Ok so the teleport script I have it has to be the same name for the models but How can Union not be a vaild member of Player if it's in the model? I'm trying to get it to probably animate and I can't do game.Workspace.InstantTeleport.Union it won't work with that. So how can I animate the brick without having to do that? and not saying this Union is not a valid member of Player. Also if anyone is wounding what me is it's a variable for game.Players.LocalPlayer
local me = game.Players.LocalPlayer local locations = script.Parent:WaitForChild("Locations") local porter = script.Parent:WaitForChild("Porter").Value local groupserv = game:GetService("GroupService") local selected = 2 local selloc = nil local location = {} local gui = script.Parent:WaitForChild("selection") function gatherLocations() for i, v in pairs(locations:GetChildren())do table.insert(location, {v.Name, v.Value}) end end function before() if(selected-1 <= 0)then return location[#location] else return location[selected-1] end end function after() if(selected+1 > #location)then return location[1] else return location[selected+1] end end function loadScenery() local b = before() local a = after() gui.card1.lname.Text = b[1] gui.cardview.lname.Text = location[selected][1] gui.card2.lname.Text = a[1] selloc = location[selected][2] gui.cardview.grouperror.Visible = false end function nextvals() if(selected+1>#location)then selected = 1 else selected = selected + 1 end loadScenery() end function prevvals() if(selected-1<=0)then selected = #location else selected = selected - 1 end loadScenery() end gui.left.MouseButton1Click:connect(function() prevvals() end) gui.right.MouseButton1Click:connect(function() nextvals() end) gui.cancel.MouseButton1Click:connect(function() local teleport = Instance.new("IntValue", me) teleport.Name = "JustTeleported" game:GetService("Debris"):AddItem(teleport, 5) me.Character.Humanoid.WalkSpeed = 16 porter.User.Value = nil local Part = script.Parent.Parent.Parent.Union for i = 1, 10 do me.Part.CFrame = me.Part.CFrame * CFrame.new(0,-1,0) wait(1) end script.Parent:Destroy() end) gui.teleport.MouseButton1Click:connect(function() if not selloc then return end if(selloc.Group.Value ~= 0)then local infoassoc = groupserv:GetGroupInfoAsync(selloc.Group.Value) if(infoassoc and (not me:IsInGroup(selloc.Group.Value)))then gui.cardview.grouperror.Text = "Teleport Failed: You're not in the group \""..infoassoc.Name.."\"" gui.cardview.grouperror.Visible = true return end end local teleport = Instance.new("IntValue", me) teleport.Name = "JustTeleported" game:GetService("Debris"):AddItem(teleport, 5) gui.Visible = false wait(2) porter.User.Value = nil me.Character:MoveTo(selloc.Porter.Position) me.Character.Humanoid.WalkSpeed = 16 local Part = script.Parent.Parent.Parent.Union for i = 1, 10 do me.Part.CFrame = me.Part.CFrame * CFrame.new(0,-1,0) wait(1) end script.Parent:Destroy() end) gatherLocations() wait(.01) loadScenery()
The Reason why you have Union is not a valid member of Player, because You need to use the Character
not the Player. To do that we need to add game.Players.LocalPlayer.Character