Problem with an script

  1. What do you want to achieve? Keep it simple and clear!
    So basically when game is loaded i need to unanchor some parts
  2. What is the issue? Include screenshots / videos if possible!
    Everything goes fine before line if game:IsLoaded then
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    No i didn’t

My code:

local Players = game.Players
local RS = game:GetService("ReplicatedStorage")
local Raft = RS:WaitForChild("StarterRaft")
Players.PlayerAdded:Connect(function(player)
	local RaftClone = Raft:Clone()
	RaftClone.Parent = game.Workspace
	if game:IsLoaded() then
		local Parts = RaftClone:GetChildren()
			Parts.Anchored = false
		end
end)

this returns a table, which doesnt have a .Anchored property.
you have to loop through each part in the table and then set their .Anchored property

Your problem is that game:IsLoaded() is for use on the Client Side, not the Server Side. It checks whether the game is loaded for the Client. If you remove this if statement, your code should work fine.

No i can’t remove that line of code because i need to make a RAFT(these two models) unanchored when player already can see a screen because when RAFT is unanchored instantly it just sail away from player

Are you running it in a local script? I’m guessing not from your code.

No server one (30 lettersssssss)

As I said, this cannot be used in a server script, it has no effect. If you’re waiting for the player to load, try this:

player.CharacterAdded:Connect(function()

end)

Ugh my raft still anchored umm

Are your models anchored in the first place?

loop through the parts in your table

Okay nvm fixed it with for loop but…
image
am still in water

you could teleport the player on the raft when they load

Just like player when spawns push the raft and it sail away, maybe you are right, but how do i get raft position?

if its one part: get the position then tp player to it
if its a model: get position of primary part/a specified spawn location and tp player to that

Okay nvm that’s not best solution with MainPart because there will be not one player, so i need tp player to specific raft and spawn pos

Main Part works fifty fifty it still sails away, but for a few seconds with me

I think there is problem in raft not in spawn, just raft needs a setup to normally swim with player, but i don’t know how to do that