Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a way to clone a gui to the other player when 2 parts collide?

Asked by
oSyM8V3N 429 Moderation Voter
6 years ago
local function onTouch (hit)
if (hit.Parent:findFirstChild("Ball") ~= nil) then
print(hit)
print("collision started")
game.ReplicatedStorage.MenuGuis.CollideGui:Clone.Parent = (don't know what to do here)
end
end

script.Parent.Touched:connect(onTouch)
0
is this a player and a part touching? creeperhunter76 554 — 6y
0
its like a player shoots a blast to another player player who shot one, and i want it so when it collide's a gui pops up on both player's screen oSyM8V3N 429 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

You're using clone the wrong way. It requires a parenthesis.

This is a parenthesis: ()

Correct usage: :Clone()

Correct script:

game.ReplicatedStorage.MenuGuis.CollideGui:Clone().Parent = (put path to the place where you want to put it, for example game.Workspace.)

A method is defined with a colon at the start and parenthesis at the end that can or not have a parameter. :Clone() is a method.

0
This is not an answer to his question. Why did you post it as an answer? oreoollie 649 — 6y
Ad

Answer this question