#Rainbow Flick System Problem

1 messages · Page 1 of 1 (latest)

modern stratus
#

local Script: ```lua
local UIS = game:GetService("UserInputService")

local Player = game.Players.LocalPlayer

local Character = Player.Character or Player.CharacterAdded:Wait()

local Humanoid = Character:WaitForChild("Humanoid")

local Anim = Humanoid:LoadAnimation(script.RainbowFlickAnim)

local Cooldown = false

UIS.InputBegan:Connect(function(input, GPE)
if GPE then return end

if input.KeyCode == Enum.KeyCode.Space then
    if Character:FindFirstChild("RealFootball") and not Cooldown then
        Cooldown = true
        Anim:Play()
        
        game.ReplicatedStorage.RemoteEvents.RainbowFlickEvent:FireServer()
        
        task.spawn(function()
            task.wait(2)
            Cooldown = false
        end)
    end
end

end)

#

Server Script: ```lua
game.ReplicatedStorage.RemoteEvents.RainbowFlickEvent.OnServerEvent:Connect(function(Player)
local Character = Player.Character

local HRP = Character:WaitForChild("HumanoidRootPart")

local Ball = Character:WaitForChild("RealFootball")

if Ball:IsA("BasePart") then
    local BallPlayer = Ball:WaitForChild("BallPlayer")
    
    
    
    
    BallPlayer.Value = false
    Ball.M6:Destroy()
    
    Ball.Position = HRP.Position + (HRP.CFrame.LookVector * -2)
    Ball.Velocity += Vector3.new(0, 100, 0)
    Ball.CanCollide = true
    Ball.Parent = game.Workspace
    Ball.CanTouch = false
    
    task.spawn(function()
        task.wait(1)
        Ball.CanTouch = true
    end)
end

end)

red kelp
#

um

#

first of all

#

Change (ServerScript)

Ball.Velocity += Vector3.new(0, 100, 0)

red kelp
#

and run it

#

and let me know

#

@modern stratus

#

Do this

rancid pendant
#

For me it looks like collison

#

U can't really expect to not have problems with applied forces when it collides with something in its way

#

@modern stratus My suggestion is simple

red kelp
#

wait

#

yes

#

Ball.CanCollide = true

#

is problem

#

why I thought that was false

#

but

red kelp
rancid pendant
red kelp
#

yes

rancid pendant
red kelp
#

ok..

#

but

#

did u see the video

rancid pendant
#

Yes

red kelp
#

ok nvm

rancid pendant
#

code is destinated to apply forces in Y axis to perform "Rainbow flick"

#

Anyways

red kelp
#

so it should be false when it flys

#

right?

rancid pendant
#

Just use collision groups for a person that has permissions over the ball

#

Possesion

red kelp
#

oh

#

yea

rancid pendant
red kelp
#

yes I know

#

I became dumb bro

#

I haven't scripted so much

rancid pendant
#

Just set collision group for the ball and person that is in possesion and turn it off for them

#

Do u know how collision groups work?

#

get my full Roblox Studio course here (50% OFF):
https://linktr.ee/ByteBlox

photos of my pet pigeons: https://www.instagram.com/subnautica_man

discord: https://discord.gg/ay5gc9XcAh

wondered how to make a main menu in roblox studio? or how to create a shop which has working GUI? ive made lots of 2024 roblox scripting tutorials about all the d...

▶ Play video
modern stratus
#

oh my god

#

guys iam so sorry

#

i didnt notice the pings

rancid pendant
#

Np

rancid pendant
#

But dunno if my theory is right tho

modern stratus
#

why i cant get pings

#

iam 3 days late

#

but