Jump to content

Recommended Posts

Hello, I have a problem I don't know how to fix. If someone can help me that'd be great :D!

So, the problem is sometimes when I spawn my fx with SetParent it makes the fx spawn behind my player which's very ugly..

So, I want to make it that it spawns following my player with SetParent but with y+0.1 then it always covers my player & doesn't sometimes glitch!

I tried doing something like this but nothing happened? Does anyone know if this's possible to do :)?

local fx = SpawnPrefab("spawn_fx_medium")
		 local x, y, z = act.target.Transform:GetWorldPosition()
            if fx ~= nil then
			   --fx.Transform:SetPosition(x, y+0.1, z)
               fx.entity:SetParent(act.target.entity, y+0.1)
            end

I would really appreciate any kind of help, thanks so much for reading my problem & have a wonderful day/night :D!!!

Edited by SuperDavid

I think this fixed my problem, hopefully. So, hopefully no more help needed on this :).

local fx = SpawnPrefab("spawn_fx_medium")
            if fx ~= nil then
               fx.entity:SetParent(act.target.entity)
			   fx.entity:AddFollower()
               fx.Follower:FollowSymbol(act.target.GUID, "torso", 0, 0, 0)
            end
Edited by SuperDavid

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...